package pers.xiaojun.boot.module.system.enums.permission;

import lombok.AllArgsConstructor;
import lombok.Getter;
import pers.xiaojun.boot.common.validation.ArrayValuable;

import java.util.Arrays;

/**
 * 菜单类型枚举类
 *
 * @author xiaojun
 * @since 2025-10-25
 */
@AllArgsConstructor
public enum MenuTypeEnum implements ArrayValuable<Integer> {

    DIR(1, "目录"),
    MENU(2, "菜单"),
    BUTTON(3, "按钮");

    private static final Integer[] ARRAY = Arrays.stream(values()).map(MenuTypeEnum::getType).toArray(Integer[]::new);

    /**
     * 类型
     */
    @Getter
    private final Integer type;
    /**
     * 类型名称
     */
    private final String name;


    @Override
    public Integer[] array() {
        return ARRAY;
    }
}
